package com.soulmate;

import io.seata.rm.datasource.DataSourceProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;
import javax.sql.DataSource;

/**
 * @author huaiping
 */
@Configuration
public class DataSourceAutoConfig {

    @Resource
    private DataSource dataSource;

    @Bean
    public DataSource dataSource() {
        return new DataSourceProxy(dataSource);
    }
}
